Skip to content

Update dependency scope for DB backends #1345

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nickrobison
Copy link

@nickrobison nickrobison commented May 7, 2025

When upgrading a project from Quartz 2.3.2 to 2.5.0 we ran into the following error:

Exception in thread "main" java.lang.NoClassDefFoundError: com/mchange/v2/c3p0/ComboPooledDataSource
	at org.quartz.utils.C3p0PoolingConnectionProvider.initialize(C3p0PoolingConnectionProvider.java:187)
	at org.quartz.utils.C3p0PoolingConnectionProvider.<init>(C3p0PoolingConnectionProvider.java:106)
	at com.rms.mapping.system.scheduler.QuartzSchedulerManager$.init(QuartzSchedulerManager.scala:225)
	at com.rms.mapping.system.scheduler.QuartzSchedulerManager$.apply(QuartzSchedulerManager.scala:201)

Looking at the Gradle build, it look like the c3p0 dependency is declared as implementation which means it's not exposed on the runtime class path. While the workaround from #1310 is sufficient if these types are exposed in the library API then it seems to make sense to change their declaration scope.

This PR updates the dependency declaration to restore the behavior of the 2.3.x library.

If these dependencies were intentionally hidden then perhaps a comment in the release notes or the README would be helpful?

Fixes issue #1310

Changes

  • Update Gradle dependency scope

Checklist

  • tested locally
  • updated the docs
  • added appropriate test
  • signed-off on the DCO referenced in the CONTRIBUTING link below via git commit -s on my commits, and submit this code under terms of the Apache 2.0 license and assign copyright to the Quartz project owners
    (If you're not using command-line, you can use a browser extension )

In submitting this contribution, I agree to the terms of contributing as referred to here:
https://github.com/quartz-scheduler/contributing/blob/main/CONTRIBUTING.md

When upgrading a project from Quartz 2.3.2 to 2.5.0 we ran into the following error:

```
Exception in thread "main" java.lang.NoClassDefFoundError: com/mchange/v2/c3p0/ComboPooledDataSource
	at org.quartz.utils.C3p0PoolingConnectionProvider.initialize(C3p0PoolingConnectionProvider.java:187)
	at org.quartz.utils.C3p0PoolingConnectionProvider.<init>(C3p0PoolingConnectionProvider.java:106)
	at com.rms.mapping.system.scheduler.QuartzSchedulerManager$.init(QuartzSchedulerManager.scala:225)
	at com.rms.mapping.system.scheduler.QuartzSchedulerManager$.apply(QuartzSchedulerManager.scala:201)
```

Looking at the Gradle build, it look like the `c3p0` dependency is declared as `implementation` which means it's not exposed on the runtime class path. While the workaround from quartz-scheduler#1310 is sufficient if these types are exposed in the library API then it seems to make sense to change their declaration scope.

 This PR updates the dependency declaration to restore the behavior of the 2.3.x library.

If these dependencies were intentionally hidden then perhaps a comment in the release notes or the README would be helpful?

Signed-off-by: Nick Robison <nickrobison@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant